<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>thymeleaf入门demo</title>
</head>
<body>

    <div th:text="${name}"></div><br>

    用户名:<span th:text="${user.username}"></span><br>

    <div th:each="str,stat : ${list}">
        <span th:text="${str}"></span>----<span th:text="${stat.index}"></span>
    </div>

    <div th:if="${age>30}">
        你已成年
    </div>
</body>
</html>